package com.pen.sample.client.model.objects;

import com.google.gwt.core.client.JsArray;
import com.pen.sample.client.model.delegate.BaseResponse;

public class StockFood extends BaseResponse
{
	protected StockFood()
	{
		
	}
	
	public final native double getChange()
	/*-{
		return this.change;
	}-*/;
	
	public final native double getPrice()
	/*-{
		return this.price;
	}-*/;
	
	public final native String getSymbol()
	/*-{
		return this.symbol;
	}-*/;
	
	public final double getChangePercent()
	{
		return 100.0 * getChange() / getPrice();
	}
	
	public static final native JsArray<StockFood> getStockList( String json )
	/*-{
		return eval('(' + json + ')');
	}-*/;
}
